package main

import (
	"github.com/gin-gonic/gin"
	"net/http"
)

// main
//
//	@Description: 快速开始
func main() {
	//创建一个默认路由引擎
	engine := gin.Default()

	//配置路由, GET POST PUT DELETE
	engine.GET("/get", func(c *gin.Context) {
		c.String(http.StatusOK, "%s", "get success")
	})

	engine.POST("/add", func(c *gin.Context) {
		c.String(200, "%s", "add success")
	})

	engine.PUT("/edit", func(c *gin.Context) {
		c.String(http.StatusOK, "%s", "edit success")
	})
	engine.DELETE("/delete", func(c *gin.Context) {
		c.String(http.StatusOK, "%s", "delete success")
	})
	//启动服务
	engine.Run("0.0.0.0:8881")

}
